package com.sakiko.audiobook.search.service;

import com.sakiko.audiobook.model.search.AlbumInfoIndex;
import com.sakiko.audiobook.query.search.AlbumIndexQuery;
import com.sakiko.audiobook.vo.search.AlbumSearchResponseVo;

import java.util.List;
import java.util.Map;

public interface SearchService {

    /**
     * 专辑上架
     * @param albumId
     */
    void upperAlbum(Long albumId);

    /**
     * 专辑下架
     * @param albumId
     */
    void lowerAlbum(Long albumId);

    /**
     * 检索
     * @param albumIndexQuery
     * @return
     */
    AlbumSearchResponseVo search(AlbumIndexQuery albumIndexQuery);

    /**
     * 根据一级分类Id获取频道页数据
     * @param category1Id
     * @return
     */
    List<Map<String, Object>> getChannel(Long category1Id);

    /**
     * 自动补全
     * @param keyword
     * @return
     */
    List<String> completeSuggest(String keyword);

    /**
     * 获取最新专辑排行榜
     */
    void updateLatelyAlbumRanking();

    /**
     * 查看排行榜 (从缓存中检索)
     * @param category1Id
     * @param rankingDimension
     * @return
     */
    List<AlbumInfoIndex> findRankingList(Long category1Id, String rankingDimension);
}
